1. Field of the Invention
The present invention relates to an image processing device, and more specifically to a container inner surface tester for checking the inner surface of a container to be carried on a conveyor, and for detecting foreign substances, dust, scratches, etc. on the surface.
2. Description of the Related Art
FIGS. 1A and 1B show views for explaining the method of checking a cylindrical container having metallic luster on its inner surface. FIG. 1A is a top view of a container viewed from above in the axis direction, and FIG. 1B is side cross-sectional view. 2 is a container, and 1 is a ring-shaped illuminator for illuminating the container 2 from above. The ring-shaped illuminator 1 and the container 2 are concentric. When the illuminator 1 evenly irradiates with its ring-shaped light the inner surface of the container 2, the light reflects on the surface having metallic luster. When the container is viewed from above, concentric intensity variations (hereinafter referred to as an illuminance pattern) can be observed inside the container. FIG. 1A shows a highlighted portion (a portion of halation) generated by a directly reflecting light of the illuminator. Among highlighted portions, an opening highlighted portion 3 and a bottom highlighted portion 4 indicate the largest intensity.
FIG. 2A shows a scanning line Q-Q1 running along the diameter of the container shown in FIG. 1A. FIG. 2B is the graph indicating changes in illuminance (intensity) inside the container along the scanning line Q-Q1. The graph can be obtained even if the line Q-Q1 is rotated with the center of the container set as the center of the rotation. The illuminance pattern changes depending on a container to be checked. That is, the highlighted portions and the non-highlighted portions appearing due to not reflecting a light in the direction of the point at which the container is viewed are generated depending on a container being checked. However, the feature that illuminance concentrically generates is maintained for any container. In the example shown in FIG. 2B, the intensity variations can be classified into 5 level area from W1 to W5. First area W1 corresponds to the opening highlighted portion 3; second area W2 corresponds to the internal upper middle part of the container indicating comparatively high intensity; third area W3 corresponds to the internal lower middle part of the side of the container subject to less amount of light of the illumination 1 shown in FIG. 1A indicating intensity lower than other portion of the container; fourth area W4 corresponds to the highlighted portion of the bottom; and fifth area W5 corresponds to the inner bottom of the container.
Conventionally, these areas W1-W5 are provided with a window individually and assigned thresholds used for detecting defects such as black spots (black points) and white spots (white points) according to the optical characteristics of each area. One method of detecting a defect is, for example, to convert by a predetermined threshold, a multi-value continuous tone image signal of 8 bits, etc. to a binary value. The signal is obtained by analog/digital(A/D)-converting an analog video signal (analog continuous tone image signal) obtained by scanning a target image. Another method is a differentiation method in which the above-described video signal is differentiated through a differentiation circuit shown in FIG. 3 to extract a defect signal. In the differentiation method, a differentiation signal can be obtained for the contour of a test object. While either of a positive pulse or a negative pulse is generated by the differentiation along the contour of a test object, these pulses are generated simultaneously at a fine defective point, thereby extracting a defect.
That is, if the following expressions exist between a value P(i,j) and values P(i-.alpha.,j) and P(i+.beta.,j), where P(i,j) indicates a target point (coordinates x=i and y=j) referred to by a signal P(x,y) obtained by differentiating an analog continuous tone image signal generated by a raster scanning operation, and P(i-.alpha.,j) and P(i+.beta.,j) indicate respective points positioned by predetermined number of .alpha. picture elements forward and positioned by predetermined number of .beta. picture elements backward of the above-described point P(i,j) in the x direction of the scanning line. EQU P(i,j)-P(i-.alpha.,j)&gt;TH1 and EQU P(i+.beta.,j)-P(i,j)&gt;TH1
where TH1 indicates a predetermined threshold (positive value).
Binary function values PD(i,j)=i and PD(i,j)=0 are defined for detecting a defect on a target point and respectively indicate an defective black point and a non-defective point.
However, in the above-described defect detecting method, an optimum value of a threshold TH1 to be determined according to optical characteristics of a container inner surface changes. Accordingly, in the conventional method, a number of concentric circle windows are necessary as shown by windows W1-W5 in FIG. 2B (five windows in this case). Simultaneously, these windows must be assigned different thresholds TH1 (and coordinates .alpha., .beta.). Thus, much time is wasted during the raster scanning operation, thereby offering a bottleneck to a high speed defect detection.
FIGS. 4A to 4C are views for explaining the problem in the conventional defect detecting method based on the differentiation method. FIG. 4A shows an example of intensity variations (analog continuous tone image signal) obtained by scanning along the scanning line Q-Q1; FIG. 4B shows an example of an analog differentiation signal shown in FIG. 4A; and FIG. 4C shows an example of a digital differentiation signal shown in FIG. 4A. The portions indicated by letters BD shown in FIGS. 4A-4C correspond to black spots. That is, there are following problems in the conventional defect detecting method in which a black level defect BD is extracted by a signal in the area having intensity variations as shown in FIG. 4A. In the analog differentiation method, a differentiation signal indicating a small defective point is superposed on a basic intensity differentiation signal due to a time constant of a filter circuit as shown in FIG. 4B. In the digital differentiation method, a signal indicates unstable values as shown in FIG. 4C, and a differentiation signal indicating a defective point is embedded in noise components, thereby getting in difficulties in detecting a defect signal according to a predetermined threshold.
FIG. 5A is a sample top view of a container 2 having a projected portion 2a which often generates highlighted portions 4-1, 4-2, etc. in series according to the form of the container's bottom or the variations in the reflection of a light from the side of the container. Specifically, most metallic containers have a mirror like inner surface and cause the above described problems.
Such highlighted portions can be hardly removed only by appropriately using an illumination. Therefore, the conventional defect detecting method has, in vain, to solve the above described uneven illumination generated as a highlighted portion inside a test container in testing its inner surface.
The first object of the present invention is to provide a cylindrical container inner surface tester for detecting a defective portion stably and precisely even though there is uneven illumination inside a test container.
Containers for containing food, etc. are generally manufactured in larger quantities per hour. When a fault has arisen in a container manufacturing device in a production line, a large number of defective products may be produced in a short time unless the production line is immediately stopped. The production line should recover from the trouble. However, it takes much time in recovering the line from the trouble and probably brings a considerable economic loss. If a container forming device is faulty, the trouble occurs that a large number of containers having major defects such as concavity, deformation are produced in series. FIG. 6 shows a major-defective container. In this example, the container has concavity 5 on its side. When the concavity 5 has arisen, the reflection pattern of a light inside a container becomes irregular, and the illuminance does not indicate a concentric pattern, thereby generating asymmetric highlighted portions and non-highlighted portions.
Conventionally, a consecutive defect monitoring process has been performed to prevent defective products from being produced in large quantities. In this process, a major defect threshold is preliminarily set in an inspection device. An occurrence of major defects is detected and a major defect alarm is issued if determination of a defective product is made consecutively and the number of defective products exceeds the predetermined consecutive defect threshold.
Furthermore, there is a conventional method of monitoring a defect rate. In this method, a rate of defect determination in the total number of times of acceptance/rejection determination is constantly monitored, and an inspection device calculates a floating defect rate each time determination is made to detect major defects and to issue a major defect alarm when the floating defect rate exceeds a defect rate threshold preliminarily set in the inspection device.
However, the consecutive defect monitoring method has the problem that it is very difficult to detect a major-defective container when it does not appear consecutively on a production line and the essential problem that major-defective containers may have been produced by the predetermined number (equal to a consecutive defect threshold) by the time a major-defective container is detected.
Also in the defect rate monitoring method, a delay arises between an actual occurrence of major defects and the detection of major defects by the inspection device, and a large number of major-defective containers are produced during the period of the delay.
Therefore, an occurrence of major defects should be detected not by the above described consecutive defect monitoring method or defect rate monitoring method, but should be immediately detected by individually checking each container.
Thus, the second object of the present invention is to provide a cylindrical container inner surface tester for reducing an economic loss by immediately stopping the production of major-defective containers after quickly detecting a major-defective container.